/*****************************************************************************************
 * FILE NAME: srv                      COPYRIGHT (c) cos 2024
 * REVISION:  1.0.0                                     All Rights Reserved
 * DESCRIPTION:
 * =======================================================================================
 * UPDATE HISTORY:
 * REV      AUTHOR      DATE
 * v1.0.0   Tuxin       2024.10.14
 * DESCRIPTION OF CHANGE:
 ****************************************************************************************/
#ifndef __SRV_H
#define __SRV_H

//----------------------------------------------------------------------------------------
// @Project Includes
#include "typedefs.h"

//----------------------------------------------------------------------------------------
// @Global Macro Define in the module
#define ABS(n)                    ((n) >= 0 ? (n) : -(n))
#define ClrBit(x, y)          		((x) &= ~(1<<(y)))
#define SetBit(x,y)            		((x) |= (1<<(y)))
#define GetBit(x,y)     					(((x)>>(y))&(0x01))

//----------------------------------------------------------------------------------------
// @Global Type defines in the module

//----------------------------------------------------------------------------------------
// @Export global Variables declare in the module

//----------------------------------------------------------------------------------------
// @Export declaration of functions in the module
void srv_init(void);
void srv_getAvgFromDeepFilter(const uint16_t *p_t_raw,uint16_t *avg,const uint8_t data_count);
int32_t srv_calcArithmeticAvgFilterVal(const int32_t* raw,  const uint16_t num_of_data, const uint32_t invalid_val);
bool_t srv_bufferCmp(uint8_t* pBuffer1, uint8_t* pBuffer2, uint16_t BufferLength);
uint16_t srv_swapHighLowNibbles(uint16_t temp);
#endif

// =======================================================================================
// End of file.
// =======================================================================================
